package edu.gduf.controller;
import edu.gduf.domain.ResultInfo;
import edu.gduf.service.PersonalShowService;
import edu.gduf.service.impl.InspectReportGenerateServiceImpl;
import edu.gduf.service.impl.PersonalShowServiceImpl;
import edu.gduf.service.impl.SignInFormGenerateServiceImpl;
import edu.gduf.service.impl.political.PoliticalElectronicGenerateServiceImpl;
import edu.gduf.service.impl.political.PoliticalSituationGenerateServiceImpl;
import edu.gduf.service.impl.publicity.*;
import edu.gduf.service.impl.record.ActivistRecordGenerateServiceImpl;
import edu.gduf.service.impl.record.DeveloperRecordGenerateServiceImpl;
import edu.gduf.service.impl.record.PartyMemberRecordGenerateServiceImpl;
import org.apache.ibatis.io.Resources;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.*;


@Controller
@RequestMapping("/info")
public class GetInformationController {

    @Autowired
    private PersonalShowService personalShowService;


    @RequestMapping("/get_person_info")
    @ResponseBody
    public ResultInfo GetPersonInfo(String num)
    {
        return personalShowService.getInformationByNum(num);
    }

    @RequestMapping("/get_members_info")
    @ResponseBody
    public ResultInfo GetMembersInfo(String branch,String stage,int page,String profession,String classNum) {
        return personalShowService.getMembers(branch, stage, page, profession, classNum);

    }

    @RequestMapping("/classNum")
    @ResponseBody
    public ResultInfo getClassNum(String profession){
        return personalShowService.getClassNum(profession);
    }


    @RequestMapping("/profession")
    @ResponseBody
    public ResultInfo getProfession(String branch){
        return personalShowService.getProfession(branch);
    }


}
